package com.dhcc.bpm.modules.system.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.common.vo.SelectVo;
import com.dhcc.bpm.modules.system.entity.User;
import com.dhcc.bpm.modules.system.entity.UserInfo;
import com.dhcc.bpm.modules.system.vo.UserVO;
import org.springblade.core.mp.base.BaseService;

import java.util.List;

/**
 * @ClassName IUserService
 * @Description  服务类
 * @Author sjm
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
public interface IUserService extends BaseService<User> {

	/**
	 * @Description 新增用户
	 * @Author sjm
	 * @Date 10:23 2020/2/22 0022
	 * @param user
	 * @return boolean
	 **/
	boolean submit(User user);

	/**
	 * @Description 修改用户
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param user
	 * @return boolean
	 **/
	boolean updateUser(User user);
	/**
	 * @Description 查询用户邮箱
	 * @Author daina
	 * @Date 11:16 2020/3/28
	 * @param user
	 * @return java.util.List<com.dhcc.bpm.modules.system.entity.User>
	 **/
	User selectByEmail(User user);
	/**
	 * @Description 查询用户手机
	 * @Author daina
	 * @Date 11:44 2020/3/28
	 * @param user
	 * @return java.util.List<com.dhcc.bpm.modules.system.entity.User>
	 **/
	User selectByPhone(User user);

	/**
	 * @Description 查询板块下面的用户
	 * @Author daina
	 * @Date 10:47 2020/3/5
	 * @param page
	 * @param user
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.system.vo.UserVO>
	 **/
	IPage<UserVO> listTopicUser(IPage<UserVO> page, UserVO user);
	/**
	 * @Description 自定义分页
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param page
	 * @param user
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.system.entity.User>
	 **/
	IPage<User> selectUserPage(IPage<User> page, User user);

	/**
	 * @Description 用户信息
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param userId
	 * @return com.dhcc.bpm.modules.system.entity.UserInfo
	 **/
	UserInfo userInfo(Long userId);

	/**
	 * @Description 用户信息
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param tenantId
	 * @param account
	 * @param password
	 * @return com.dhcc.bpm.modules.system.entity.UserInfo
	 **/
	UserInfo userInfo(String tenantId, String account, String password);

	/**
	 * @Description 给用户设置角色
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param userIds
	 * @param roleIds
	 * @return boolean
	 **/
	boolean grant(String userIds, String roleIds);

	/**
	 * @Description 初始化密码
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param userIds
	 * @return boolean
	 **/
	boolean resetPassword(String userIds,String resetPassword);

	/**
	 * @Description 修改密码
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param userId
	 * @param oldPassword
	 * @param newPassword
	 * @param newPassword1
	 * @return boolean
	 **/
	boolean updatePassword(Long userId, String oldPassword, String newPassword, String newPassword1);

	/**
	 * @Description 删除用户
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param userIds
	 * @return boolean
	 **/
	boolean removeUser(String userIds);

	/**
	 * @Description 根据账号查询用户信息
	 * @Author sjm
	 * @Date 10:24 2020/2/22 0022
	 * @param account
	 * @return com.dhcc.bpm.modules.system.entity.User
	 **/
	User selectUserByaccount(String account);

	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/3/20 14:26
	 * @param null
	 * @return
	 * @throws
	 **/
	List<SelectVo> selectUserName();
	/**
	 * @Description TODO
	 * @Author xiafayu
	 * @Date 2020/3/20 14:26
	 * @param ids
	 * @return
	 * @throws
	 **/
	List<String> selectUserNameByIds(List<Long> ids);

	/**
	 * @Description 根据角色id查询用户
	 * @Author xiafayu
	 * @Date 2020/8/18 9:28
	 * @param roleId
	 * @return
	 * @throws
	 **/
	List<User> getByRoleId(String roleId);
	/**
	 * @Description 根据id查询用户
	 * @Author wjh
	 * @Date 2020年9月23日14:41:12
	 **/
	 User  getById(Long id);
}
